<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        *{
            margin: 0;
            padding: 0;
        }
        img{
            display: block;
            height: 300px;
        }
        div{
            width: 100px;
            height: 754px;
            background-color: red;
            float: left;
        }
       p{
            width: 100px;
            height: 750px;
            background-color: red;
            float: left;
       }
    </style>
</head>
<body>
    <!-- <div></div>
    <p></p> -->
    <img src="./loading.gif" alt="" src_real="./imgs/1.jpg" height="300"  id="r">
    <img src="./loading.gif" alt="" src_real="./imgs/2.jpg" >
    <img src="./loading.gif" alt="" src_real="./imgs/3.jpg" >
    <!-- <img src="./loading.gif" alt="" src_real="./imgs/4.jpg" > -->
    <img src="./loading.gif" alt="" src_real="./imgs/5.jpg" >
    <img src="./loading.gif" alt="" src_real="./imgs/6.jpg" >
    <img src="./loading.gif" alt="" src_real="./imgs/7.jpg" >
    <img src="./loading.gif" alt="" src_real="./imgs/8.gif" >
    <script src="./lazyload.js"></script>
    <script>

        let imgs = document.querySelectorAll("img")
      
        gogo(imgs)
        let t =null
        window.onscroll =function(){
            clearInterval(t)
        t = setTimeout(()=>{
            gogo(imgs)
        },500)
      
        }
       
    </script>
</body>
</html>